<?php
include APPLICATION_PATH."/models/base/Product_CategoryBase.php";
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class Model_Product_Category extends Model_Product_CategoryBase{
    
}
class Model_Product_CategoryMapper extends Model_Product_CategoryMapperBase{
     public function fetchAllPublished(){
        $db = Zend_Db_Table::getDefaultAdapter();
        $select=$db->select()
                ->from('product_category');
                //->where('status=1');
        $stmt=$select->query();
        $rows = $stmt->fetchAll(PDO::FETCH_CLASS);
        $stmt->closeCursor();
        $entries   = array();
        foreach ($rows as $row) {
            $entry = new Model_Product_Category();
            $entry->setId($row->id)
                ->setId($row->id)
                ->setName($row->name)
                ->setParent($row->parent)
                ->setCreated($row->created)
                ->setCreated_By($row->created_by)
                ->setModified($row->modified)
                ->setModified_By($row->modified_by)                    
                ->setOrder($row->order)
                ->setStatus($row->status);
            $entries[] = $entry;
        }
        return $entries;
    }
    
}

